package server.main.utils;

import java.sql.Timestamp;
import java.util.Date;

public class DateUtils {


    public static Date getNowDatetime(){
//        Date date = new Date();
//        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//        //从前端或者自己模拟一个日期格式，转为String即可
//        String dateStr = format.format(date);
//
//
//        return dateStr;

        Date utilDate = new Date();//util utilDate
//        System.out.println("utilDate : " + utilDate);

        Timestamp Date = new Timestamp(utilDate.getTime());
//        System.out.println(Date);
        return Date;
    }

    public static void main(String[] args) {
        System.out.println(getNowDatetime());
    }


}
